Working with PrizmDoc > Developer Guide > Customizing the Viewing Client > Architecture & Design |
The Viewing Client offers the following features out of the box:
The Viewing Client’s responsive UI is designed for phone, tablet, and desktop users. A single UI implementation adapts to the viewport size of the device or element in which it is embedded.
A jQuery plugin is used to embed the full-featured, responsive Viewing Client on the page.
Example |
Copy Code
|
---|---|
$("#myDiv").pccViewer(pluginOptions);
|
The Viewing Client UI and behavior can be configured when the Viewing Client is embedded, using JavaScript parameters.
Example |
Copy Code
|
---|---|
var pluginOptions = { documentID : "1234abcd", encryption : false, viewMode : "EqualWidthPages" } |
Configurable options include:
If the Viewing Client needs to be customized more than configuration options allow, all UI code is open-source and can be modified to suit customization needs.
The open-source Viewing Client code is separated into CSS files, template HTML files, and JavaScript. The code leverages custom HTML attributes and Underscore.js’ templating system in-order to maintain separation of concerns.
The Viewing Client API offers complete control over the Viewing Client. The API allows callers to augment, customize, or automate the end user’s experience with the Viewing Client.
The API functionality covers:
Example |
Copy Code
|
---|---|
var api = $("#myDiv").pccViewer(pluginOptions).viewerControl; api.on("PageCountReady", function() { api.changeToLastPage(); }); |
The core component used by the Viewing Client for rendering the document is the ViewerControl.
The ViewerControl is a component that can be used independent of the full Viewing Client; it can be directly embedded into a page and used for building a fully custom UI.
Left example above: embedding the full Viewing Client using the jQuery plugin. Right example above: embedding the ViewerControl alone. |
The ViewerControl does not have dependencies on third party libraries.